import { Input } from 'tdesign-react'
import { useTranslation } from 'react-i18next'

import '../index.less'
const CreateQuestionnaireTitle = (props: any) => {

  const {
    title,
    setTitle,
  } = props

  const { t } = useTranslation(['webGames'])
  
  // 这一部分甚至可以去掉，在下面直接使用 onChange={(event: string) => { setTitle(event) }}
  const onQuestionnaireTitleChange = (event: string) => {
    // props.titleValue(event)
    setTitle(event)
  }

  return <div className='create-questionnaire-title'>
  <Input
    className='input-questionnaire-title'
    label='问卷主题'
    placeholder='请输入问卷主题'
    defaultValue={title}
    onChange={(event:string) => { setTitle(event) }}
    key={'stage1'}
  />
</div>
}
export default CreateQuestionnaireTitle
